package tvdi

class AdminFilters {

    def filters = {
        adminOnly(controller:'*', action:"(create|edit|update|delete|save|list|show)") {
            before = {
                if(!session?.usuario?.admin){
					flash.message = "Desculpe, somente o administrador"
					redirect(uri:"/")
					return false
                }
            }
        }
    }
    
}
